﻿@using xiushen.Infrastructure
@model xiushen.Models.BookQueryResult
@{
    ViewBag.Title = "title";

}
<h2>
    title</h2>
<ul>
    @{
        foreach (var data in Model.Books)
        {
            var hasContent = !string.IsNullOrEmpty(data.DirectContent);
            var actionName = "Chapters";
            if (hasContent)
            {
                actionName = "BookContent";
            }
        <li>
            <h4>
                <a href="@Url.Action(actionName, new { bookId = data.ID, categoryId = data.CategoryID, })">@data.Name</a>
            </h4>
            <span class="dashLine"></span>
            <div>
                作者：@data.Author 分类：@data.Category.Name</div>
            <div class="description">
                @Html.Raw(data.Description)
            </div>
            <a href="@Url.Action(actionName, new { bookId = data.ID, categoryId = data.CategoryID })" class="btn btn-info pull-right">
                阅读</a> <span class="dashLine"></span></li>
        }
        foreach (var data in Model.PdfBooks)
        {
         
        <li>
            <h4>
                <a href="@Url.Action("PdfView", new { url = data.Url() })">@data.DisplayName</a>
            </h4>
            <span class="dashLine"></span>
            <div>
                分类：@data.Category.Name</div>
            <div class="description">
                @Html.Raw(data.Description)
            </div>
            <a a href="@Url.Action("PdfView", new { url = data.Url() })" class="btn btn-info pull-right">
                阅读</a> <span class="dashLine"></span></li>
        }
    }
</ul>
